<style>
    .dialog-sp {
        background-color: #1ab394;
    }

    .dialog-group-sp {
        float: left;
    }

    .form-control {
        width: 40%;
        min-width: 40px;
    }
</style>
<script type="text/javascript" src="jedate/jedate.js"></script>
<script type="text/javascript">
    //jeDate.skin('gray');
    jeDate({
        dateCell: "#dateinfo",
        format: "YYYY年MM月DD日 hh:mm:ss",
        isinitVal: true,
        isTime: true, //isClear:false,
        minDate: "2014-09-19 00:00:00",
        okfun: function (val) {
            alert(val)
        }
    })
</script>
<div class="row" :controller="Test">
    <!--标题-->
    <div class="col-md-12">
        <div class="row">
            <button class="pull-right btn btn-info" data-toggle="modal" data-target="#myModal">添加试卷</button>
            <div class="modal fade dialog" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                 aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                            <h3 class="modal-title" id="myModalLabel" style="text-align: center">添加试卷</h3>
                        </div>
                        <div class="modal-body">
                            <div>
                                <div style="display: inline-block;width: 50%">
                                    <div class="input-group input-group-sm">
                                        <span class="input-group-addon dialog-sp">考试名称</span>
                                        <input type="text" class="form-control" :duplex="@addKSName">
                                    </div>
                                </div>
                                <div style="display: inline-block;width: 50%">
                                <div class="input-group input-group-sm">
                                <span class="input-group-addon dialog-sp">考试批次</span>
                                <input type="text" class="form-control" :duplex="@addKSBatch">
                                </div>
                                </div>
                            </div>
                            <br>
                            <!--<div class="input-group input-group-sm">-->
                            <!--<span class="input-group-addon dialog-sp">选择层次</span>-->
                            <!--<select class="form-control" :click="majorfn">-->
                            <!--<option :for="(k,v) in @layer">{{v.Name}}</option>-->
                            <!--</select>-->
                            <!--</div>-->
                            <!--<br>-->
                            <div>
                                <div style="display: inline-block;width: 50%">
                                    <div class="input-group input-group-sm">
                                        <span class="input-group-addon dialog-sp">选择科目</span>
                                        <select class="form-control" :click="subjctfn" style="min-width: 170px"
                                                :duplex="@addKSSubject">
                                            <option ms-for="(k,v) in @subjct">{{v.Name}}</option>
                                        </select>
                                    </div>
                                </div>
                                <div style="display: inline-block;width: 50%">
                                    <div class="input-group input-group-sm">
                                        <span class="input-group-addon dialog-sp">选择方案</span>
                                        <select class="form-control" style="min-width: 170px" :duplex="@addKSMethod"
                                                :click="waysallfn">
                                            <option ms-for="(k,v) in @waysall">{{v.Name}}</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <br>
                            <div>
                                <div style="display: inline-block;width: 50%">
                                    <div class="input-group input-group-sm">
                                        <span class="input-group-addon dialog-sp">选择难度</span>
                                        <select class="form-control"
                                                style="width: 50%;min-width: 170px" :duplex="@addKSDifficuty">
                                            <option>1</option>
                                            <option>2</option>
                                            <option>3</option>
                                            <option>4</option>
                                        </select>
                                    </div>
                                </div>
                                <div style="display: inline-block;width: 50%">
                                    <div class="input-group input-group-sm">
                                        <span class="input-group-addon dialog-sp">考试时长</span>
                                        <input type="text" class="form-control " :duplex="@addKSTime"
                                               style="width: 50%;min-width: 80px">
                                        <span class="input-group-addon dialog-sp dialog-group-sp">分钟</span>
                                    </div>
                                </div>
                            </div>
                            <br>
                            <div>
                                <div style="display: inline-block;width: 50%">
                                    <div class="input-group input-group-sm">
                                        <span class="input-group-addon dialog-sp">考试开始</span>
                                        <input class="form-control" id="datebut" type="text" placeholder="请选择" readonly
                                               style="width: 48%;min-width: 70px" :duplex="@addKSExamStart">
                                        <input class="input-group-addon btn btn-info" type="button"
                                               onClick="jeDate({dateCell:'#datebut',isTime:true,format:'YYYY-MM-DD hh:mm:ss'})"
                                               value="选择">
                                    </div>
                                </div>
                                <div style="display: inline-block;width:50%">
                                    <div class="input-group input-group-sm">
                                        <span class="input-group-addon dialog-sp">考试结束</span>
                                        <input class="form-control" id="datebut1" type="text" placeholder="请选择" readonly
                                               style="width: 48%;min-width: 70px" :duplex="@addKSExamEnd">
                                        <input class="input-group-addon btn btn-info" type="button"
                                               onClick="jeDate({dateCell:'#datebut1',isTime:true,format:'YYYY-MM-DD hh:mm:ss'})"
                                               value="选择">

                                    </div>
                                </div>
                            </div>
                            <br>
                            <div>
                                <div style="display: inline-block;width: 50%">
                                    <div class="input-group input-group-sm">
                                        <span class="input-group-addon dialog-sp">练习开始</span>
                                        <input class="form-control" id="datebut2" type="text" placeholder="请选择" readonly
                                               style="width: 48%;min-width: 70px" :duplex="@addKSTrainStart">
                                        <input class="input-group-addon btn btn-info" type="button"
                                               onClick="jeDate({dateCell:'#datebut2',isTime:true,format:'YYYY-MM-DD hh:mm:ss'})"
                                               value="选择">
                                    </div>
                                </div>
                                <div style="display: inline-block;width:50%">
                                    <div class="input-group input-group-sm">
                                        <span class="input-group-addon dialog-sp">练习结束</span>
                                        <input class="form-control" id="datebut3" type="text" placeholder="请选择" readonly
                                               style="width: 48%;min-width: 70px" :duplex="@addKSTrainEnd">
                                        <input class="input-group-addon btn btn-info" type="button"
                                               onClick="jeDate({dateCell:'#datebut3',isTime:true,format:'YYYY-MM-DD hh:mm:ss'})"
                                               value="选择">

                                    </div>
                                </div>
                            </div>
                            <br>
                            <div class="input-group input-group-sm">
                                <input type="checkbox">&nbsp;知识点均衡
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                            <button type="button" class="btn btn-primary" data-dismiss="modal" :click="@addExam">提交</button>
                        </div>
                    </div><!-- /.modal-content -->
                </div><!-- /.modal -->
            </div>
        </div>

        <div class="search_head col-md-8">
            <span style=" font-size: 15px;">考试名称 </span><input type="text" class="form-control"
                                                               style=" display: inline-block;width: 150px;">
            <span style=" font-size: 15px;margin-left: 20px">考试批次 </span><input type="text" class="form-control" style=" display: inline-block;width: 150px;" >
            <span style=" font-size: 15px;margin-left: 20px">科目</span>
            <select class="form-control" style=" display: inline-block;width: 150px;" :click-1="subjctfn" :click-2="seKeMuTest" :duplex="seKemu">
                <option ms-for="(k,v) in @subjct">{{v.Name}}</option>
            </select>
            <span style=" font-size: 15px;margin-left: 20px">方案</span>
            <select class="form-control" style=" display: inline-block;width: 150px;" :click-1="waysallfn" :click-2="seMethodTest" :duplex="seMethod">
                <option ms-for="(k,v) in @waysall" >{{v.Name}}</option>
            </select>
            <span style=" font-size: 15px;margin-left: 20px">难度</span>
            <select class="form-control" style=" display: inline-block;width: 150px;" :click-1="difficultyfn" :click-2="seDiffiTest" :duplex="seDiffi">
                <option :for="(k,v) in @difficulty">{{v.Level}}</option>
            </select>
            <button type="button" class="btn btn-default navbar-btn" style="margin-left: 20px" ms-click="@searchTest">
                查询
            </button>
        </div>


        <!-- 列表--><br>

        <table class="table table-responsive table-bordered" style="margin: 50px 0;text-align: center;" id="ModelTable">
            <thead style="word-break: keep-all;white-space: nowrap">
            <tr>
                <td style="display: none">SID</td>
                <td>#</td>
                <td>考试名称</td>
                <td>考试批次</td>
                <td>科目</td>
                <td>方案</td>
                <td>难度</td>
                <td>考试时长</td>
                <td>考试时间</td>
                <td>练习时间</td>
                <td>操作</td>
            </tr>
            </thead>
            <tbody>
            <tr ms-for="(k,v) in @exampapers" class="ola-pointer">
                <td style="display: none">{{v.SID}}</td>
                <td>{{k}}</td>
                <td>
                    <button class="btn btn-sm btn-link">{{v.SJName}}</button>
                </td>
                <td style="min-width: 133px;"><button class="btn btn-sm btn-link">{{v.TBatch}}</button></td>
                <td>{{v.KID}}</td>
                <td>{{v.FID}}</td>
                <td>{{v.ELID}}</td>
                <td>{{v.TTime}}</td>
                <td style="width: 200px">{{v.TSTime}}—{{v.TETime}}</td>
                <td style="width: 200px">{{v.PSTime}}—{{v.PETime}}</td>
                <td>
                    <!--<button class="btn btn-sm btn-link" >修改</button>-->
                    <button class="btn btn-sm btn-link" data-toggle="modal" data-target="#myModal1" onclick="editModel(this)">修改</button>
                    <div class="modal fade dialog" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                         aria-hidden="true">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                                    <h3 class="modal-title" id="myModalLabel1" style="text-align: center">修改试卷模板</h3>
                                </div>
                                <div class="modal-body">
                                    <div>
                                        <div style="display: inline-block;width: 50%">
                                            <div class="input-group input-group-sm">
                                                <span class="input-group-addon dialog-sp">考试名称</span>
                                                <input type="text" class="form-control" :duplex="@editaddKSName">
                                            </div>
                                        </div>
                                        <div style="display: inline-block;width: 50%">
                                            <div class="input-group input-group-sm">
                                                <span class="input-group-addon dialog-sp">考试批次</span>
                                                <input type="text" class="form-control" :duplex="@editaddKSBatch">
                                            </div>
                                        </div>
                                    </div>
                                    <!--<br>-->
                                    <!--<div>-->
                                        <!--<div style="display: inline-block;width: 50%">-->
                                            <!--<div class="input-group input-group-sm">-->
                                                <!--<span class="input-group-addon dialog-sp">选择科目</span>-->
                                                <!--<select class="form-control" style="min-width: 170px"-->
                                                        <!--:duplex="@editaddKSSubject">-->
                                                    <!--<option ms-for="(k,v) in @subjct">{{v.Name}}</option>-->
                                                <!--</select>-->
                                            <!--</div>-->
                                        <!--</div>-->
                                        <!--<div style="display: inline-block;width: 50%">-->
                                            <!--<div class="input-group input-group-sm">-->
                                                <!--<span class="input-group-addon dialog-sp">选择方案</span>-->
                                                <!--<select class="form-control" style="min-width: 170px" :duplex="@editaddKSMethod">-->
                                                    <!--<option ms-for="(k,v) in @waysall">{{v.Name}}</option>-->
                                                <!--</select>-->
                                            <!--</div>-->
                                        <!--</div>-->
                                    <!--</div>-->
                                    <br>
                                    <div>
                                        <div style="display: inline-block;width: 50%">
                                            <div class="input-group input-group-sm">
                                                <span class="input-group-addon dialog-sp">选择难度</span>
                                                <select class="form-control" :duplex="@editaddKSDifficuty"
                                                        style="width: 50%;min-width: 170px">
                                                    <option>1</option>
                                                    <option>2</option>
                                                    <option>3</option>
                                                    <option>4</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div style="display: inline-block;width: 50%">
                                            <div class="input-group input-group-sm">
                                                <span class="input-group-addon dialog-sp">考试时长</span>
                                                <input type="text" class="form-control " :duplex="@editaddKSTime"
                                                       style="width: 50%;min-width: 80px">
                                                <span class="input-group-addon dialog-sp dialog-group-sp">分钟</span>
                                            </div>
                                        </div>
                                    </div>
                                    <br>
                                    <div>
                                        <div style="display: inline-block;width: 50%">
                                            <div class="input-group input-group-sm">
                                                <span class="input-group-addon dialog-sp">考试开始</span>
                                                <input class="form-control" id="datebut00" type="text" placeholder="请选择" readonly
                                                       style="width: 48%;min-width: 70px" :duplex="@editaddKSExamStart">
                                                <input class="input-group-addon btn btn-info" type="button"
                                                       onClick="jeDate({dateCell:'#datebut00',isTime:true,format:'YYYY-MM-DD hh:mm:ss'})"
                                                       value="选择">
                                            </div>
                                        </div>
                                        <div style="display: inline-block;width:50%">
                                            <div class="input-group input-group-sm">
                                                <span class="input-group-addon dialog-sp">考试结束</span>
                                                <input class="form-control" id="datebut11" type="text" placeholder="请选择" readonly
                                                       style="width: 48%;min-width: 70px" :duplex="@editaddKSExamEnd">
                                                <input class="input-group-addon btn btn-info" type="button"
                                                       onClick="jeDate({dateCell:'#datebut11',isTime:true,format:'YYYY-MM-DD hh:mm:ss'})"
                                                       value="选择">

                                            </div>
                                        </div>
                                    </div>
                                    <br>
                                    <div>
                                        <div style="display: inline-block;width: 50%">
                                            <div class="input-group input-group-sm">
                                                <span class="input-group-addon dialog-sp">练习开始</span>
                                                <input class="form-control" id="datebut22" type="text" placeholder="请选择" readonly
                                                       style="width: 48%;min-width: 70px" :duplex="@editaddKSTrainStart">
                                                <input class="input-group-addon btn btn-info" type="button"
                                                       onClick="jeDate({dateCell:'#datebut22',isTime:true,format:'YYYY-MM-DD hh:mm:ss'})"
                                                       value="选择">
                                            </div>
                                        </div>
                                        <div style="display: inline-block;width:50%">
                                            <div class="input-group input-group-sm">
                                                <span class="input-group-addon dialog-sp">练习结束</span>
                                                <input class="form-control" id="datebut33" type="text" placeholder="请选择" readonly
                                                       style="width: 48%;min-width: 70px" :duplex="@editaddKSTrainEnd">
                                                <input class="input-group-addon btn btn-info" type="button"
                                                       onClick="jeDate({dateCell:'#datebut33',isTime:true,format:'YYYY-MM-DD hh:mm:ss'})"
                                                       value="选择">

                                            </div>
                                        </div>
                                    </div>
                                    <!--<br>-->
                                    <!--<div class="input-group input-group-sm">-->
                                        <!--<input type="checkbox">&nbsp;知识点均衡-->
                                    <!--</div>-->
                                </div>
                                <div class="modal-footer">
                                    <button class="btn btn-primary btn-block" type="submit" onclick="updateModel()">更新模板</button>
                                </div>
                            </div><!-- /.modal-content -->
                        </div>
                    </div>
                    <button class="btn btn-sm btn-link" onclick="deletModel(this)">删除</button>

                </td>
            </tr>
            </tbody>
            <tfoot>
            <tr>
                <td colspan="80">
                    <div class="row">
                        <div class="col-md-5">
                            <span>第&nbsp;</span><span>{{@Search.P}}</span><span>&nbsp;页</span>&nbsp;&nbsp;
                            <span>共&nbsp;</span><span>{{@Search.TP}}</span><span>&nbsp;页</span>
                        </div>
                        <div class="col-md-5">
                            <ul class="pagination" style="margin: 0 0 0 0;">
                                <li :if="@Search.P>1"><a :click="@Search.P--">&laquo;</a></li>
                                <li :for="v in @Search.Pages" :click="@Search.P=v"><a
                                        :class="[(@Search.P==v?'selected':'')]">{{v}}</a></li>
                                <li :if="@Search.P<@Search.TP"><a :click="@Search.P++">&raquo;</a></li>
                            </ul>
                        </div>
                    </div>
                </td>
            </tr>
            </tfoot>
        </table>


        <!-- 分页-->
        <div style="margin-bottom: 120px;">
        </div>
        <div :if="@html.length>0" class="layui-layer-shade" id="layui-layer-shade" times="1"
             style="z-index:19891014; background-color:#000; opacity:0.3; filter:alpha(opacity=30);"></div>
        <div :if="@html.length>0" class="layui-layer layui-layer-page layui-layer-demo layer-anim-02"
             type="page" times="1" showtime="0" contype="string"
             style="z-index: 19891015; width: 80%; height: 80%; top: 87.5px; left: 144px;">
            <div id="" class="layui-layer-content" style="height: 698px;" ms-html="@html">
            </div>
            <span class="layui-layer-setwin"><a class="layui-layer-ico layui-layer-close layui-layer-close2"
                                                href="javascript:;" :click-1="@html=''" :click-2="@Type='List'">

        </a></span><span class="layui-layer-resize"></span>
        </div>
    </div>

</div>
